package com.wn.date20190821;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.UnknownHostException;

import com.woniuxy.im.Message;

public class Reg extends Thread
{
	private Message m;
	public Reg(Message m)
	{
		this.m=m;
	}
	@Override
	public void run()
	{
		try
		{
			Socket socket=new Socket(m.getTo(), 8000);
			ObjectOutputStream os=new ObjectOutputStream(socket.getOutputStream());
			os.writeObject((Object)m);
		} catch (UnknownHostException e)
		{
//			e.printStackTrace();
		} catch (IOException e)
		{
//			e.printStackTrace();
		}
		
	}
	
}
